<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="pragma" content="no-cache" />
		<meta http-equiv="cache-control" content="no-cache" />
		<meta http-equiv="Expires" content="0" />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Insert title here</title>
		<script type="text/javascript">
			// json的定义
			var json = {
				"key1":11,
				"key2":"drs",
				"key3":[12,"asd",true],
				"key4":{
					"key5":324
				}
			}

			//对象
			alert(typeof (json))

			// json的访问
			alert(json.key1)

			// json对象转字符串
			var jsonString = JSON.stringify(json)
			alert(jsonString)

			// json字符串转json对象
			var jsonObj = JSON.parse(jsonString)
			alert(jsonObj)

		</script>
	</head>
	<body>
		
	</body>
</html>